<?php if($this->Session->read('Auth.User.Group.id')==ROLE_ADMIN){?>
    <h3 style="text-align: center;">Benvenuto <?php echo $this->Session->read('Auth.User.Anagrafica.cognome')." ".$this->Session->read('Auth.User.Anagrafica.nome') ?></h3>
<?php }else{?>
    <h3 style="text-align: center;">Bentornato prof. <?php echo $this->Session->read('Auth.User.Anagrafica.cognome')." ".$this->Session->read('Auth.User.Anagrafica.nome') ?></h3>
<?php }?>
<h4 style="text-align: center;">scegli il Piano di Lavoro:</h4>
<br/>
<?php foreach ($plan_list as $plan) { ?>
    <div class="span2 classe">
        <div class="tile" style="min-height: 230px;background: #FAFAFA;border: 2px dashed #ccc;">
          <i class="icon-briefcase icon-3x tile-image"></i> 
            <h3 class="tile-title"><?php echo $plan['Classe']["anno"].$plan['Classe']["sezione"]; ?></h3>
            <p style="min-height: 60px;">
                    <?php echo $plan['Plan']['titolo']?><br>
                <small class="muted">
                    <i class="icon-time"></i> 2013-02-03 23:45
                </small>
                <br><br>
                <label><i class="icon-2x <?echo $plan['Plan']['lock']==1?'icon-lock':'icon-unlock' ?>"></i><br>
                <?php if($plan['Plan']['lock']==1){?>
                <small class="muted">
                    <i class="icon-time"></i> <?echo $plan['Plan']['dt_lock']?>
                </small> 
                <?php }else{?>
                    <?php echo $this->Acl->link(__("Blocca Piano"), array("controller" => "Plan", "action" => "lock", $plan["Plan"]["id"]),null,null,null,null,true);  ?>
                
                <?php }?>    
                </label>
            </p>
            <div class="">
                    <a class="btn btn-info btn-large btn-block" href="<?php echo $this->webroot; ?>Plan/view/<?php echo $plan['Plan']['id']; ?>">Accedi</a>
            </div>
        </div>
    </div>
<?php } ?>

